@extends("base.base")
@include('Commodity.header')
@section('main')
    <link rel="stylesheet" href="{{asset(env('CDN_HOST')."/public/css/commodity/res.css")}}">
    <main id="main" class="main">
        <ul class="main-ul">
            @if(empty($commodity))
                <div class="nothing">没有找到与<span class="keyword">"{{$keyword}}"</span>相关的商品</div>
            @else
                @foreach($commodity as $key => $value)
                    <a href="/commodity/{{$value["commodity_id"]}}">
                        <li class="main-li commodity-box" data-id="{{$value["commodity_id"]}}">
                            <div class="commodity-img">
                                <img class="box-img" src="{{$value["index_img_url"]}}"
                                     alt="{{$value["commodity_name"]}}">
                            </div>
                            <div class="commodity-info overflow_hidder">
                                {{$value["commodity_name"]}}
                            </div>
                            <div class="commodity-price">
                                <span>¥</span><span>{{$value["commodity_info_price"]}}</span>
                            </div>
                        </li>
                    </a>
                @endforeach
            @endif
        </ul>
    </main>
@endsection